//
//  Yblb2Cell.swift
//  Auscultation
//
//  Created by 来 on 2020/12/25.
//

import Foundation

class Yblb2Cell: UICollectionViewCell {
    
    var tzzx: UILabel!
    var mz: UILabel!
    var sj: UILabel!
    var status: UILabel!
    
    // 播放
    var play_button: UIButton!
    // 时间
    var play_time: UILabel!
    // 进度
    var play_line: UIView!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        let back_view = UIView.init()
        back_view.backgroundColor = UIColor.white
        back_view.clipsToBounds = true
        back_view.layer.cornerRadius = 4
        back_view.layer.borderColor = UIColor.init(lgf_HexString: "E1E4E7")?.cgColor
        back_view.layer.borderWidth = 0.5
        addSubview(back_view)
        back_view.snp.makeConstraints { (make) in
            make.top.equalTo(8)
            make.left.equalTo(15)
            make.right.equalTo(-15)
            make.bottom.equalTo(-8)
        }
        
        tzzx = UILabel.init()
        tzzx.lgf_AddShowAllText()
        tzzx.text = "停诊中心-001"
        tzzx.font = UIFont.systemFont(ofSize: 16)
        tzzx.textColor = UIColor.init(lgf_HexString: "222222")
        back_view.addSubview(tzzx)
        tzzx.snp.makeConstraints { (make) in
            make.top.equalTo(25)
            make.left.equalTo(17)
        }
        
        status = UILabel.init()
        status.text = ""
        status.lgf_AddShowAllText()
        status.textAlignment = .center
        status.backgroundColor = UIColor.init(lgf_HexString: "F27C0F")?.withAlphaComponent(0.1)
        status.textColor = UIColor.init(lgf_HexString: "F27C0F")
        status.layer.borderColor = UIColor.init(lgf_HexString: "F27C0F")?.withAlphaComponent(0.2).cgColor
        status.font = UIFont.systemFont(ofSize: 11)
        status.layer.borderWidth = 1
        back_view.addSubview(status)
        status.snp.makeConstraints { (make) in
            make.centerY.equalTo(tzzx)
            make.right.equalToSuperview().offset(-17)
            make.width.equalTo(55)
            make.height.equalTo(19)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
